package com.jtech.dribbble.view.activity;

import android.os.Bundle;

import com.jtech.dribbble.R;
import com.jtech.dribbble.presenter.TestPresenter;
import com.jtech.dribbble.util.ActivityUtils;
import com.jtech.dribbble.view.activity.base.BaseActivity;
import com.jtech.dribbble.view.fragment.TestFragment;

/**
 * 演示用activity
 */
public class TestActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //实例化fragment对象
        TestFragment testFragment = TestFragment.newInstance("这里传入一个toast");
        //添加fragment
        ActivityUtils.addFragmentToActivity(getSupportFragmentManager(), testFragment, R.id.content);
        //创建presenter对象,也可以通过主构造传入参数
        new TestPresenter(testFragment, getRequestManager());
    }
}